﻿@model Everynet.SubHardware
@{
    ViewBag.Title = "EditSubHardware";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<script src="../../ckeditor/ckeditor.js" type="text/javascript">
 </script>
<h2>
    EditSubHardware</h2>
<p>
    @Html.ActionLink("Dashboard", "Dashboard", "Admin")
</p>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true, "Please correct the errors and try again.")
    <fieldset>
        <legend>Edit SubExtras</legend>
        @Html.HiddenFor(model => model.SubHardwareID)
        <div class="editor-label">
            @Html.LabelFor(model => model.SubHardwareName)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.SubHardwareName, new { maxlength = "30" })
            @Html.ValidationMessageFor(model => model.SubHardwareName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.SubHardwareDetail)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.SubHardwareDetail, new { maxlength = "30" })
            @Html.ValidationMessageFor(model => model.SubHardwareDetail)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.SubHardwarePrice)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.SubHardwarePrice, new { maxlength = "30" })
            @Html.ValidationMessageFor(model => model.SubHardwarePrice)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.HardwareID)
        </div>
        <div class="editor-field">
            @Html.DropDownList("HardwareID")
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Agreement)
        </div>
        <div class="editor-field">
         @Html.TextAreaFor(model => model.Agreement)
         </div>
           <div class="editor-label">
            Public Visible:  @Html.CheckBoxFor(model => model.VisiblePublic)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<script>

    // This call can be placed at any point after the
    // <textarea>, or inside a <head><script> in a
    // window.onload event handler.

    // Replace the <textarea id="editor"> with an CKEditor
    // instance, using default configurations.

    CKEDITOR.replace('Agreement');

		</script>
<div>
    @Html.ActionLink("Back to List", "subHardware")
</div>
